package com.szeldon.pj.jps.exp;

import com.szeldon.pj.jps.datastore.SimpleObject;

public class NameExpression extends Expression {

	private String name;

	/**
	 * 
	 * @param name
	 */
	public NameExpression(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	@Override
	public int compareTo(SimpleObject object) throws IllegalStateException {
		throw new IllegalStateException("NameExpression doesn't support comparison with " + object.getClass().getName()
				+ ".");
	}
	
	public String getValueAsString() {
		return name;
	}

}
